package com.itheima.jdk8date;

import java.time.Duration;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

public class Demo4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入入职日期:");
        String s = sc.nextLine();
        s+=" 01时00分00秒";
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy-MM-dd HH时mm分ss秒");
        LocalDateTime parse = LocalDateTime.parse(s, pattern);

        LocalDateTime localDateTime = LocalDateTime.now();
        Duration duration = Duration.between(parse, localDateTime);
        System.out.println("您已入职黑马"+duration.toDays()+"天");
    }
}
